home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
ada_a9x
/
excp.ada
< prev
next >
Wrap
Text File
|
1996-01-30
|
401b
|
16 lines
WITH Ada.TEXT_IO; USE Ada.TEXT_IO;
PROCEDURE Exception_Test IS
I : Integer := 0;
BEGIN
I := 4 / I;
Put_Line(Integer'IMAGE(I));
EXCEPTION
WHEN Program_Error | Constraint_Error =>
Put_Line("PROGRAM_ERROR OR CONSTRAINT_ERROR.");
WHEN The_Error : OTHERS =>
Put(" FATAL ERROR: ");
Put(SYSTEM.EXCEPTIONS.EXCEPTION_NAME(The_Error));
Put_Line(".");
RAISE;
END Exception_Test;